def log_event(log_callback, event, *contexts):
    """uses the given logger callback to log an event
    in a standard way (mainly so post-processing can
    be uniform for any contextual metadata)"""
    
    if len(contexts) > 0:
        
        # log event with dict contexts
        final_context = {}
        for context in contexts:
            final_context.update(context)
        return log_callback("%(event)s %(final_context)s" % dict(event=event, final_context=repr(final_context)))
    
    else:
        
        # log event by itself
        return log_callback(event)